package com.zy.edu.config.api;

import com.zy.edu.bean.ResponseInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;

@RestController

public class ApiTokenController {

    @Autowired
    private ApiTokenService tokenService;

    @RequestMapping("/apiToken")
    @GetMapping
    public Map token() {
        return tokenService.createToken();
    }

    @ApiIdempotent
    @RequestMapping("/apiTokenTest")
    @GetMapping
    public Map tokenTest() {
        return ResponseInfo.success("11");
    }

}


